#!/bin/sh
colors=(30 31 32 33 34 35 36 37)
length=${#colors[*]}
for ((i=0; i<$length; i++))
do
  echo -e "\033[${colors[i]}m This is color text "
  sleep 1
  printf "\033c"
done
echo -e "\033[0m"

exit 0

#!/bin/sh
colors=(30 31 32 33 34 35 36 37)
text=(t r a n n g o c d i e n)
unset $dis
length=${#text[*]}
echo $length
i=$((length-1))
echo $i
for ((i=$((length-1)); i>=0; i--))
do
  #echo -e "\033[${colors[0]}m ${text[i]} "
  dis="${text[i]}$dis"
  echo $dis
  echo ${text[i]}
  sleep 1
  printf "\033c"
done
printf "\033c"
echo -e "\033[0m"

exit 0